package cn.hongwei.selector;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author Great
 * @email 1224028994@qq.com
 */
public class MySelector implements ImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        //返回类的全限定名称,那么这两个对象就可以加入到IOC容器,默认也是单利和立即加载的
        //注意:此时bean的名字就是全类名
        return new String[]{"cn.hongwei.selector.StudentDao","cn.hongwei.selector.StudentService"};
    }
}
